<%@page import="com.atkins.spring.data.IGoonData.GoonList"%>
<%@page import="com.atkins.spring.data.IGoonData.GoonRef"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    
	<h2>List of goons</h2>
	<ul>
		<c:forEach items="${goonList.list}" var="g">
			<li>
				<c:out value="${g.name}"></c:out>
				<input type="button" value="Get details" name="btnDetail" /> 
				<input type="hidden" value="<spring:url value="/goon/getDetails/${g.id}" ></spring:url>" name="detailsURL" />
			</li>
		</c:forEach>
	</ul>
	<%-- 
	<% 	
		GoonList l = (GoonList) request.getAttribute("goonList");
		if(l!=null){
			for(GoonRef g : l.getList()){
				%><li><%= g.getName() %></li> 
	<%		}
		} else {
			%><li>NULL</li><%
		} %>
	--%>
